/********************************************************/
/*	Copyright (C) 2012 Gong Li Bin			*/
/*	Project:	MapReduce			*/
/*	Author:		gong_libin			*/
/*	Date:		2013_06_06			*/
/*	File:		MrRed.h				*/
/********************************************************/

#ifndef	_MRRED_H
#define	_MRRED_H 

#include "MrTask.h"

#define	MR_RD_VERSION			(char*)"MrRed-2.0.0"
#define	MR_RD_CONFIG			(char*)"SELECT Port FROM %s.%s WHERE HostID=%s"

void* MrRedThread(void* pNULL);
UCHAR MrRedLocal(MRPROKV_S* pstKv);
void MrRedFork(void* pAddr, UCHAR* puszPacket, int iLength);
void MrRedCore(CMrUdp& rCUdp, UCHAR* puszPacket, int iLength);
void MrRedProcess(struct sockaddr_in* pstAddr, UCHAR* puszPacket, int iLength);

#ifdef _MR_TEST_
UCHAR MrRedTest(MRPARA_S& stIn, MRPARA_S& stOut);
#endif

#endif /* _MRRED_H */
